I have a class with an overloaded [] operator, as follows:

Code:
char & STRING::operator[] (unsigned);
char STRING::operator[] (unsigned) const;
The class also has a char*() operator, as follows:

Code:
STRING::operator char* ();
The problem is, when I try a some code such as:
Code:
STRING a;
a[0] = 'A';
I get a compiler error saying that this operator[] call is ambiguous, that it can't decide between my STRING:perator[] and the built-in operator[] that works for char pointers. So far the only thing I can think of is that the compiler is implicitly casting my STRING to a char * using my operator char*() function. The only way this code works is if I comment out the prototype for operator char*. Unfortunately, I need to have that function working. Any help out there for me?